home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-01-13 | 5.0 KB | 209 lines |
- # This file makes TeX in its various incarnations.
- #
- # The file ../common/texmf.h uses the symbol `TeX' to define certain
- # things that are different for TeX and Metafont, hence the addition to
- # CFLAGS.
- #
-
- SITEDIR=..
- CC=gcc
- PROF=#-pg
- OPT=-O -fstrength-reduce -fcombine-regs -fomit-frame-pointer $(PROF)
- CFLAGS=$(OPT) -I$(SITEDIR) -DTeX
- LDFLAGS=#-lcposix
- SHELL=/bin/sh
-
- # The formats we know how to make.
- #
- formats=amstex.fmt etex.fmt latex.fmt slitex.fmt tex.fmt \
- texinfo.fmt picplus.fmt
-
-
- makeargs=SITEDIR="$(SITEDIR)" CC="$(CC)" OPT="$(OPT)" LDFLAGS="$(LDFLAGS)"
-
- .SUFFIXES:
- .SUFFIXES: .o .c
- .c.o:
- $(CC) $(CFLAGS) -c $*.c
-
- # Routines used everywhere.
- #
- commondefines=../common/common.defines ../common/texmf.defines
- commonh=../common/extra.h
- commono=../common/extra.o
-
- # Routines used in both TeX and Metafont.
- #
- extrac=../common/texmf.c
- extrah=../common/texmf.h
- extrao=texmf.o
-
- # Routines used in TeX, Metafont, and BibTeX.
- #
- fileioc=../common/fileio.c
- fileioh=../common/fileio.h
- fileioo=fileio.o
-
- # We don't add `$(commono)' here, since it doesn't depend on anything in
- # this directory, and we write a dependency for `$(objs)' below.
- #
- objs=$(fileioo) tex0.o tex1.o tex2.o tex3.o tex4.o tex5.o tex6.o tex7.o tex8.o
- objs2=tex9.o tex10.o tex11.o tex12.o tex13.o tex14.o tex15.o tex16.o
- iobjs=iextra.o initex.o $(objs) $(objs2)
- vobjs=tex-extr.o itex.o $(objs) $(objs2)
-
-
- default: all
-
- all: initex virtex
- mv initex h:\tex\initex.ttp
- mv virtex h:\tex\virtex.ttp
- triptrap: triptex
-
- initex: $(iobjs) $(commono)
- $(CC) $(PROF) -o initex $(iobjs) $(commono) $(LDFLAGS)
-
- virtex: $(vobjs) $(commono)
- $(CC) $(PROF) -o virtex $(vobjs) $(commono) $(LDFLAGS)
-
- run-trip:
- rm -f trip.tex
- -ln TeXtrip/trip.tex .
- ../texware/pltotf TeXtrip/trip.pl trip.tfm
- -$(SHELL) -c '. ./tripenv; \
- ./triptex < TeXtrip/trip1.in > /dev/null 2>&1'
- -diff TeXtrip/tripin.log trip.log
- -$(SHELL) -c '. ./tripenv; \
- ./triptex < TeXtrip/trip2.in > trip.fot'
- -diff TeXtrip/trip.log trip.log
- -diff TeXtrip/trip.fot trip.fot
- $(SHELL) -c '. ./tripenv; \
- ../texware/dvitype trip.dvi < TeXtrip/dvitype.in > trip.typ'
- -diff TeXtrip/trip.typ trip.typ
-
-
- # Make format files automatically.
- #
- fmts: $(formats)
-
- amstex.fmt: tex.fmt
- ./initex \&./tex amstex \\dump
-
- etex.fmt: tex.fmt
- ./initex \&./tex eplain \\dump
- mv eplain.fmt etex.fmt
- mv eplain.log etex.log
-
- # Until LaTeX and SLiTeX are updated, we must use a hacked version, that
- # sets the new parameters to reasonable values.
- #
- latex.fmt:
- ./initex lplain3 \\dump
- mv lplain3.fmt latex.fmt
- mv lplain3.log latex.log
-
- picplus.fmt: tex.fmt
- ./initex \&./tex picplus \\dump
-
- slitex.fmt:
- ./initex splain3 \\dump
- mv splain3.fmt slitex.fmt
- mv splain3.log slitex.log
-
- tex.fmt:
- ./initex plain \\dump
- mv plain.fmt tex.fmt
- mv plain.log tex.log
-
- # texinfo changes the escape character from `\' to `@'.
- #
- texinfo.fmt: tex.fmt
- ./initex \&./tex texinfo @dump
-
-
- # The `ini_to_trip' script changes texd.h, instead of the change file, so
- # retangling is not necessary. After changing constants, making a
- # triptex means making an initex.
- #
- triptex: stamp-trip $(iobjs) $(commono)
- make $(makeargs) initex
- mv initex triptex
-
- stamp-trip: stamp-convert
- rm -f *.o
- $(SHELL) ./ini_to_trip texd.h
- touch stamp-trip
-
- # tangle produces tex.p and tex.pool.
- #
- tex.p: tex.web ctex.ch
- ../web/tangle tex.web ctex.ch
-
- # The convert script produces tex[0-8].c, itex.c, coerce.h, and texd.h.
- # The (hand-coded) memory.h is included in one of tex?.c files; it isn't
- # really necessary to `convert' again if it changes, only to recompile
- # those files, but describing that relationship is ugly to do.
- # (Furthermore, memory.h is stable.)
- #
- stamp-convert: tex.p memory.h fixcoerce.h $(commondefines)
- $(SHELL) ./convert
- touch stamp-convert
-
- # The (hand-coded) file $(extrac) and the (generated) file itex.c have
- # #ifdefs for INITEX, so we compile them differently.
- #
- iextra.o: $(extrac) texd.h $(extrah) $(commonh)
- $(CC) $(CFLAGS) -I. -DINITEX -DINI -c $(extrac)
- mv $(extrao) iextra.o
-
- initex.o: itex.c texd.h $(extrah) $(commonh)
- $(CC) $(CFLAGS) -DINITEX -c itex.c
- mv itex.o initex.o
-
- $(objs): texd.h
- tex-extr.o: $(extrac) texd.h
- $(CC) $(CFLAGS) -I. -c $(extrac)
- mv $(extrao) tex-extr.o
-
- $(fileioo): $(fileioc) $(fileioh)
- $(CC) $(CFLAGS) -I. -c $(fileioc)
-
- tex0.o: tex0.c
- tex1.o: tex1.c
- tex2.o: tex2.c
- tex3.o: tex3.c
- tex4.o: tex4.c
- tex5.o: tex5.c
- tex60o: tex6.c
- tex7.o: tex7.c
- tex8.o: tex8.c
- tex9.o: tex9.c
- tex10.o: tex10.c
- tex11.o: tex11.c
- tex12.o: tex12.c
- tex13.o: tex13.c
- tex14.o: tex14.c
- tex15.o: tex15.c
- tex16.o: tex16.c
-
- clean:
- rm -f stamp-* *.o triptex initex virtex *.lzh *.bak
- rm -f texd.h coerce.h *.log *.fmt *.aux
- rm -f 8terminal.tex trip.* tripos.tex dvitype.out
-
- veryclean: clean
- rm -f tex?.c itex.c tex.p tex.pool texput.*
- rm -f \#*\# *~ *.bak *.ckp core
-
- lharc:
- rm -f tex.lzh tex.bak
- lharc a tex.lzh initex virtex tex.pool
-
- lharc-obj:
- rm -f texobj.lzh texobj.bak
- lharc a texobj.lzh initex virtex tex.pool *.o
-
- lharc-src:
- rm -f texsrc.lzh texsrc.bak
- lharc a texsrc.lzh *.c *.h Makefile
-